#include "des3.h"
#include <windows.h>

int _tmain(int argc, _TCHAR* argv[])
{

	//des test
	byte key[]="12345678";
	byte mesg[]="helloqwe";
	byte enbuf[8]={0};
	byte debuf[8]={0};
	des_context _des_context;

	my_des_set_key(&_des_context,key);
	des_encrypt(&_des_context,mesg,enbuf);

	des_decrypt(&_des_context,enbuf,debuf);

	//3des test
	byte key3[]="123456788765432114785236";
	des3_context _3des_context;

	des3_set_3keys(&_3des_context,key3);
	des3_encrypt(&_3des_context,mesg,enbuf);
	des3_decrypt(&_3des_context,enbuf,debuf);
	
	
	//md5 test
	byte input[]="helloworld";
	byte out[16]={0};
	MD5Init();
	MD5Update(input,10);
	MD5Final(out);
	
	//SHA1
	SHA1Context sha;
	char testarray[] = "helloworld";
	byte Message_Digest[20] = { 0 };
	err = SHA1Reset(&sha); 
	err = SHA1Input(&sha, (const unsigned char *)testarray, strlen(testarray));
	err = SHA1Result(&sha, Message_Digest);

	return 0;
}